package views;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.ResultSet;

import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;

import presenters.AdminReportPresenter;


public class AdminReportPanel extends JPanel {
	/**
	 * 
	 */
	private static final long serialVersionUID = -4079155476066313652L;
	private AdminReportPresenter myPresenter;
	
	/**
	 * Create the panel.
	 */
	public AdminReportPanel() {
		setLayout(new BorderLayout(0, 0));
		
		JPanel panel = new JPanel();
		add(panel, BorderLayout.CENTER);
		
		Box verticalBox = Box.createVerticalBox();
		panel.add(verticalBox);
		
		JLabel lblChooseAReport = new JLabel("Choose A Report:");
		verticalBox.add(lblChooseAReport);
		
		JComboBox comboBox = new JComboBox();
		verticalBox.add(comboBox);
		
		JButton btnGenerate = new JButton("Generate");
		verticalBox.add(btnGenerate);
		btnGenerate.addActionListener(new MyActionListener());

		myPresenter = new AdminReportPresenter(this);
	} // close constructor
	
	
	public void displayData(ResultSet rs) {
		
	}
	
	public void process() {
		myPresenter.generateReport();
	}
	
	private class MyActionListener implements ActionListener {

		@Override
		public void actionPerformed(ActionEvent e) {
			myPresenter.generateReport();
			
		}
		
	}

}
